package com.x.client.fragment

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.BaseViewHolder
import com.gg.baselibrary.BaseFragment
import com.x.client.R
import kotlinx.android.synthetic.main.fragment_recyclerview.*

/**
 * Creator : GG
 * Date    : 2018/5/21
 * Mail    : gg.jin.yu@gmai.com
 * Explain :
 */
class CarListFragment : BaseFragment() {

    companion object {
        fun newInstance() = CarListFragment()
    }

    override fun getLayoutResId(): Int = R.layout.fragment_recyclerview


    override fun initData() {
        super.initData()
        recyclerView.adapter = CarListAdapter(listOf("111111","22222","3333","4444","5555","66666","77777","88888","99999","10","11","12","13","14","15","16","17","18"))

    }


    class CarListAdapter (data:List<String> = listOf()): BaseQuickAdapter<String, BaseViewHolder>(R.layout.item_car,data) {
        override fun convert(helper: BaseViewHolder?, item: String?) {
            helper?.setText(R.id.text, item)
        }

    }
}